From: Paul Eggert Date: Mon, 15 Aug 2011 19:23:11 +0000 (-0700) Subject: * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT, X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~2464^2~15 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=79bee61a14f4c74682e0e601d29731f7db0a9118;p=emacs.git * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT, since either will do and ptrdiff_t is convenient with xpalloc. --- diff --git a/src/ChangeLog b/src/ChangeLog index c2514360d91..fc12b899ad7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,9 @@ Integer and memory overflow issues (Bug#9196). + * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT, + since either will do and ptrdiff_t is convenient with xpalloc. + * charset.c (charset_table_size) (struct charset_sort_data.priority): Now ptrdiff_t. (charset_compare): Don't overflow if priorities differ greatly. diff --git a/src/buffer.c b/src/buffer.c index b61d083c3e6..5a6484e3105 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2943,7 +2943,7 @@ static struct sortstrlist overlay_heads, overlay_tails; static unsigned char *overlay_str_buf; /* Allocated length of overlay_str_buf. */ -static EMACS_INT overlay_str_len; +static ptrdiff_t overlay_str_len; /* A comparison function suitable for passing to qsort. */ static int